POV-Ray : Newsgroups : povray.general : normals function : Re: normals function Server Time
3 Aug 2024 22:12:21 EDT (-0400)
  Re: normals function  
From: Mikael Pohjola
Date: 13 Jan 2004 10:27:12
Message: <opr1pzvldo0x9foi@news.povray.org>
On 11 Jan 2004 10:56:24 -0500, Warp <war### [at] tagpovrayorg> wrote:
>   The result of the dot-product of two vectors is a scalar which is the
> product of the lengths of the two vectors multiplied with the cosine of
> the angle between them.
>   The good thing about the dot-product is that it's very easy to 
> calculate
> with multiplications and additions only. The dot-product of <ux, uy, uz>
> and <vx, vy, vz> is ux*vx+uy*vy+uz*vz.

I think you left out the most useful thing: the dot-product is 0 when the 
two vectors are perpendicular to each other (since the cosine of 90 
degrees is 0)

-- 
light_source{20*y,1}#macro _(M,X,Y,P)#macro L(N,D)#if(N)#declare 
P=P+D;box{-
0.5,0.5translate z*mod(9*P.gray,4)pigment{rgb P}rotate 45*x+clock*y 
translate
P}L(N-1,D)#end#end#if(M)L(mod(M,8)<mod(X,3)mod(Y,3)1>-1)_(div(M,8)div(X,3)div
(Y,3)P)#end#end _(2301603551,12850,60365,20*z-5*x)plane{y,-9pigment{rgb 1}}


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.